package com.iotechn.unimall.admin.api.cacheManage;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;

import java.util.List;
import java.util.Map;

/**
 * 缓存管理
 *
 * @author kyms
 * @date 2020-05-13 13:56
 */
@HttpOpenApi(group = "admin.cacheManage", description = "缓存清理")
public interface CacheManageService {

    @HttpMethod(description = "获取缓存")
    public List<Map<String, Object>> listAllCacheKey(@HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "清理缓存", permission = "admin.cacheManage.clear", permissionParentName = "系统设置", permissionName = "清理缓存")
    public Object clearAllCacheKey(@NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;
}
